import { jest } from '@jest/globals';
import { formatTime, calculateDuration } from '../../../src/utils/time.mjs';

describe('Time Utils', () => {
  test('formatTime should format date correctly', () => {
    const date = new Date('2024-03-15T10:30:00');
    expect(formatTime(date)).toBe('2024-03-15 10:30:00');
  });

  test('calculateDuration should return duration in seconds', () => {
    const startTime = new Date('2024-03-15T10:30:00');
    const endTime = new Date('2024-03-15T10:30:30');
    expect(calculateDuration(startTime, endTime)).toBe(30);
  });
}); 